home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / utilitys / setsped1 / part01
Encoding:
Internet Message Format  |  1991-03-06  |  7.0 KB

  1. Path: news.larc.nasa.gov!amiga-request
  2. From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
  3. Subject: v91i044: SetSpeed 1.0 - set speed of Fatter Agnus chip, Part01/01
  4. Reply-To: simpsonc@project4.computer-science.manchester.ac.uk
  5. Newsgroups: comp.sources.amiga
  6. Message-ID: <comp.sources.amiga:v91i044@ab20.larc.nasa.gov>
  7. Date: 03 Mar 91 23:24:20 GMT
  8. Approved: tadguy@uunet.UU.NET (Tad Guy)
  9. X-Mail-Submissions-To: amiga@uunet.uu.net
  10. X-Post-Discussions-To: comp.sys.amiga.misc
  11.  
  12. Submitted-by: simpsonc@project4.computer-science.manchester.ac.uk
  13. Posting-number: Volume 91, Issue 044
  14. Archive-name: utilities/setspeed-1.0/part01
  15.  
  16. [ includes uuencoded executable  ...tad ]
  17.  
  18.   Newer versions of the Amiga are fitted with the Fatter Agnus chip which,
  19. amongst other things, allows you to specify whether to run your machine at
  20. 50 or 60Hz. On PAL machines with a good quality display, this causes the
  21. screen to strech so that only the top 200 lines can be seen on the screen,
  22. but the machine runs faster. With a poorer quality display, the screen
  23. flickers badly, but the increase in speed still occurs. As NTSC machines
  24. already run at 60Hz (I think!) no speed increase can be obtained, but 
  25. somebody somewhere might find a use for the 50Hz mode.
  26.  
  27.   SetSpeed works from the CLI only. Typing "SetSpeed" without any command
  28. line parameters will cause a brief help message to appear telling you what
  29. to do. To set the speed, use "SetSpeed x" where x is either an "S" or "F"
  30. to select slow (50Hz) or fast (60Hz) mode. The value of x can be either
  31. upper or lower case. To change the speed at a later time, just run the
  32. program again, but supply the opposite speed as a value of x.
  33.  
  34. #!/bin/sh
  35. # This is a shell archive.  Remove anything before this line, then unpack
  36. # it by saving it into a file and typing "sh file".  To overwrite existing
  37. # files, type "sh file -c".  You can also feed this as standard input via
  38. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  39. # will see the following message at the end:
  40. #        "End of archive 1 (of 1)."
  41. # Contents:  SetSpeed.Doc SetSpeed.S SetSpeed.uu
  42. # Wrapped by tadguy@ab20 on Sun Mar  3 18:24:16 1991
  43. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  44. if test -f 'SetSpeed.Doc' -a "${1}" != "-c" ; then 
  45.   echo shar: Will not clobber existing file \"'SetSpeed.Doc'\"
  46. else
  47. echo shar: Extracting \"'SetSpeed.Doc'\" \(1362 characters\)
  48. sed "s/^X//" >'SetSpeed.Doc' <<'END_OF_FILE'
  49. XSetSpeed v1.0
  50. X-------------
  51. X
  52. XDISTRIBUTION:
  53. X
  54. X  This program is copyright 1990 Chris Simpson, but can be freely
  55. Xdistributed by any means as long as the source code and this file are
  56. Xincluded in the distribution.
  57. X
  58. XINTRODUCTION:
  59. X
  60. X  Newer versions of the Amiga are fitted with the Fatter Agnus chip which,
  61. Xamongst other things, allows you to specify whether to run your machine at
  62. X50 or 60Hz. On PAL machines with a good quality display, this causes the
  63. Xscreen to strech so that only the top 200 lines can be seen on the screen,
  64. Xbut the machine runs faster. With a poorer quality display, the screen
  65. Xflickers badly, but the increase in speed still occurs. As NTSC machines
  66. Xalready run at 60Hz (I think!) no speed increase can be obtained, but 
  67. Xsomebody somewhere might find a use for the 50Hz mode.
  68. X
  69. XUSAGE:
  70. X
  71. X  SetSpeed works from the CLI only. Typing "SetSpeed" without any command
  72. Xline parameters will cause a brief help message to appear telling you what
  73. Xto do. To set the speed, use "SetSpeed x" where x is either an "S" or "F"
  74. Xto select slow (50Hz) or fast (60Hz) mode. The value of x can be either
  75. Xupper or lower case. To change the speed at a later time, just run the
  76. Xprogram again, but supply the opposite speed as a value of x.
  77. X
  78. XCOMMENTS:
  79. X
  80. X  Mail any comments, bug reports or suggestions to me at the following 
  81. Xe-mail address : 
  82. X            simpsonc@uk.ac.man.cs.p4
  83. X
  84. END_OF_FILE
  85. if test 1362 -ne `wc -c <'SetSpeed.Doc'`; then
  86.     echo shar: \"'SetSpeed.Doc'\" unpacked with wrong size!
  87. fi
  88. # end of 'SetSpeed.Doc'
  89. fi
  90. if test -f 'SetSpeed.S' -a "${1}" != "-c" ; then 
  91.   echo shar: Will not clobber existing file \"'SetSpeed.S'\"
  92. else
  93. echo shar: Extracting \"'SetSpeed.S'\" \(1074 characters\)
  94. sed "s/^X//" >'SetSpeed.S' <<'END_OF_FILE'
  95. X*** INCLUDES ***
  96. X
  97. X        incdir    include:
  98. X
  99. X        include    exec/exec_lib.i
  100. X        include    libraries/dos_lib.i
  101. X
  102. X*** CODE ***
  103. X        move.b    (a0),CmdLineChar    
  104. X
  105. X        lea    DOSName,a1
  106. X        clr.l    d0
  107. X        CALLEXEC OpenLibrary
  108. X        tst.l    d0
  109. X        beq    NoDOSLib
  110. X        move.l    d0,_DOSBase
  111. X
  112. X        move.b    CmdLineChar,d0
  113. X
  114. X        cmp.b    #"f",d0
  115. X        beq    Mode60Hz
  116. X        cmp.b    #"F",d0
  117. X        beq    Mode60Hz
  118. X        cmp.b    #"s",d0
  119. X        beq    Mode50Hz
  120. X        cmp.b    #"S",d0
  121. X        beq    Mode50Hz
  122. X
  123. X        CALLDOS Output
  124. X        move.l    d0,d1
  125. X        move.l    #ErrorText,d2
  126. X        move.l    #ErrorTextLength,d3
  127. X        CALLDOS Write
  128. X        bra    CloseUp
  129. X
  130. XMode50Hz    move.w    #$20,$dff1dc
  131. X        bra    CloseUp
  132. X
  133. XMode60Hz    move.w    #$00,$dff1dc
  134. X
  135. XCloseUp        move.l    _DOSBase,a1
  136. X        CALLEXEC CloseLibrary
  137. XNoDOSLib    rts
  138. X
  139. X*** DATA ***
  140. X
  141. XDOSName        dc.b    "dos.library",0
  142. X        even
  143. X_DOSBase    dc.l    0
  144. X
  145. XCmdLineChar    dc.b    0
  146. X        even
  147. X
  148. XErrorText    dc.b    "SetSpeed v1.0   (c) 1990 Chris Simpson",10,13,10,13
  149. X        dc.b    "USAGE: SetSpeed x where x = S or s for 50Hz mode",13,10
  150. X        dc.b    "                        x = F or f for 60Hz mode",13,10,13,10
  151. X        dc.b    "Note that your Amiga must have a Fatter Agnus for this program to work!",13,10,13,10
  152. XErrorTextLength    equ    *-ErrorText
  153. X        even
  154. X
  155. END_OF_FILE
  156. if test 1074 -ne `wc -c <'SetSpeed.S'`; then
  157.     echo shar: \"'SetSpeed.S'\" unpacked with wrong size!
  158. fi
  159. # end of 'SetSpeed.S'
  160. fi
  161. if test -f 'SetSpeed.uu' -a "${1}" != "-c" ; then 
  162.   echo shar: Will not clobber existing file \"'SetSpeed.uu'\"
  163. else
  164. echo shar: Extracting \"'SetSpeed.uu'\" \(692 characters\)
  165. sed "s/^X//" >'SetSpeed.uu' <<'END_OF_FILE'
  166. Xbegin 644 SetSpeed
  167. XM```#\P`````````!``````````````!@```#Z0```&`3T````*)#^0```))"X
  168. XM@"QX``1.KOW82H!G``!V(\````">$#D```"BL#P`9F<``$RP/`!&9P``1+`\:
  169. XM`'-G```PL#P`4V<``"@L>0```)Y.KO_$(@`D/````*0F/````-DL>0```)Y.,
  170. XMKO_08```%C/\`"``W_'<8```"C/\````W_'<(GD```">+'@`!$ZN_F).=61O&
  171. XM<RYL:6)R87)Y`````````%-E=%-P965D('8Q+C`@(""I(#$Y.3`@0VAR:7,@-
  172. XM4VEM<'-O;@H-"@U54T%'13H@4V5T4W!E960@>"!W:&5R92!X(#T@4R!O<B!S2
  173. XM(&9O<B`U,$AZ(&UO9&4-"B`@("`@("`@("`@("`@("`@("`@("`@('@@/2!&%
  174. XM(&]R(&8@9F]R(#8P2'H@;6]D90T*#0I.;W1E('1H870@>6]U<B!!;6EG82!M+
  175. XM=7-T(&AA=F4@82!&871T97(@06=N=7,@9F]R('1H:7,@<')O9W)A;2!T;R!WV
  176. XM;W)K(0T*#0H```````/L````"``````````"````"````!X````D````2@``H
  177. X2`%8```!B````A`````````/RQ
  178. X``
  179. Xend
  180. Xsize 468
  181. END_OF_FILE
  182. if test 692 -ne `wc -c <'SetSpeed.uu'`; then
  183.     echo shar: \"'SetSpeed.uu'\" unpacked with wrong size!
  184. fi
  185. # end of 'SetSpeed.uu'
  186. fi
  187. echo shar: End of archive 1 \(of 1\).
  188. cp /dev/null ark1isdone
  189. MISSING=""
  190. for I in 1 ; do
  191.     if test ! -f ark${I}isdone ; then
  192.     MISSING="${MISSING} ${I}"
  193.     fi
  194. done
  195. if test "${MISSING}" = "" ; then
  196.     echo You have the archive.
  197.     rm -f ark[1-9]isdone
  198. else
  199.     echo You still need to unpack the following archives:
  200.     echo "        " ${MISSING}
  201. fi
  202. ##  End of shell archive.
  203. exit 0
  204. -- 
  205. Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
  206. Mail comments to the moderator at <amiga-request@uunet.uu.net>.
  207. Post requests for sources, and general discussion to comp.sys.amiga.misc.
  208.